package com.kh.rationaldrugreview.mapper;

import com.kh.rationaldrugreview.entity.Patient;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;

@Mapper
public interface PatientMapper {
    
    List<Patient> findAll();
    
    Patient findById(@Param("patientId") Long patientId);
    
    Patient findByCode(@Param("patientCode") String patientCode);
    
    List<Patient> findByName(@Param("name") String name);
    
    Patient findByIdentityCard(@Param("identityCard") String identityCard);
    
    List<Patient> findByDepartment(@Param("department") String department);
    
    int insert(Patient patient);
    
    int update(Patient patient);
    
    int deleteById(@Param("patientId") Long patientId);
    
    int count();
}